//  program:	TVs and polarization
//  task:       *run models--replication file
//				project: Cameras and Polarization
// 				Related files: 
//  author:     Josh Ryan \ December 4, 2023

// #Start
// program setup

set more off


use "leg_level_forstata_v6_102524.dta", replace
set seed 123456789

drop if party_id==3
replace veto=veto/100
replace citizen_ideo=citizen_ideo/100
replace state_ideo=state_ideo/100
replace total_intro=ln(total_intro)


*this is equivalent of using xtreg as far as coefficients go, but doing reghdfe to use multiway standard errors for state_cham and year

*Table F1: The Effect of Broadcast/Streamed Floor Coverage on Individual Legislator Outcomes
eststo ind1a: reghdfe np_score i.treatment majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)

eststo ind1b: reghdfe np_score i.treatment majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)

eststo ind2a: reghdfe sles treatment party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)

eststo ind2b: reghdfe sles i.treatment##i.party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)

eststo ind3a: reghdfe party_loyalty treatment party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)

eststo ind3b: reghdfe party_loyalty i.treatment##i.party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)

estout ind1a ind1b ind2a ind2b ind3a ind3b, style(tex) cells(b(star fmt(2)) se(par)) starlevels($^\#$ .1 * 0.05) stats(aic N r2) ///
varlabels(1.treatment "Adoption of Floor Coverage" 2.party_id "Legislator Party, 1=GOP" 1.treatment#2.party_id "Adoption x Party" majority "Majority Party Legislator" veto "Total No. of Bills/Resolutions Vetoed in State-Year" mds1 "Leg. Prof. 1st Dimensional Scaling" mds2 "Leg. Prof. 2nd Dimensional Scaling" state_ideo "State Ideology" ranney "Political Competition" lngsp "Gross State Product (Logged)"  tl "State Term Limits (1=Yes)" lnexp "Logged Legislative Expenditures" citizen_ideo "Citizen Ideology" lnpop "State Population (Logged)" total_intro "Logged No. of Bills Introduced" _cons "Constant")

*Figure 5: Estimated Legislator-Level Coefficients From Diff.-in-Diff. Analysis
grstyle init
grstyle set plain, horizontal grid dotted
*grstyle set ci burd, select(11 13) opacity(60)
coefplot (ind1a, label("Democrats")) ///
(ind1b, label("Republicans")), drop(_cons treatment party_id 1.party_id 0.treatment#1.party_id 1.treatment#0.party_id 1.treatment#1.party_id 0.party_id treatment party_id majority veto mds1 mds2 state_ideo ranney lngsp tl lnexp citizen_ideo lnpop total_intro *.year ) ///
yline(0) vertical xlabel(none) ylabel(-.1(.02).1, valuelabel) ///
ytitle("Estimated Coefficient of Adoption" )  ///
 legend(on)  legend(region(lstyle(none))) ///
scheme(s1mono) graphregion(fcolor(white) ifcolor(white)) title("Ideology") yscale(titlegap(5))
graph save npscore_treat, replace

grstyle init
grstyle set plain, horizontal grid dotted
*grstyle set ci burd, select(11 13) opacity(60)
coefplot (ind2a, label("Leg. Effectiveness")) (ind2b, label("Leg. Effectiveness x Party")) (ind3a, label("Party Loyalty")) (ind3b, label("Loyalty x Party")), drop(_cons party_id 1.party_id 0.treatment#1.party_id 1.treatment#0.party_id 0.party_id 1.treatment party_id majority veto mds1 mds2 state_ideo ranney lngsp tl lnexp citizen_ideo lnpop total_intro *.year ) ///
yline(0) vertical xlabel(none) ylabel(-.1(.02).1, valuelabel) ///
ytitle("Estimated Coefficient of Adoption" )  ///
 legend(on)  legend(region(lstyle(none))) ///
scheme(s1mono) graphregion(fcolor(white) ifcolor(white)) title("Effectiveness and Party Loyalty") yscale(titlegap(5))
graph save others_treat, replace

graph combine npscore_treat.gph others_treat.gph, scale(.75) scheme(s1mono) graphregion(fcolor(white) ifcolor(white)) col(2)

*Table F2: The Effect of Broadcast/Streamed Floor Coverage on Individual Legislator Outcomes Conditional on Majority Party Status
eststo ind4a: reghdfe np_score i.treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)

eststo ind4b: reghdfe np_score treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)

eststo ind5: reghdfe sles i.treatment##i.majority party_id  tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)

eststo ind6: reghdfe party_loyalty i.treatment##i.majority party_id tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)


estout ind4a ind4b ind5 ind6, style(tex) cells(b(star fmt(2)) se(par)) starlevels($^\#$ .1 * 0.05) stats(aic N r2) ///
varlabels(1.treatment "Adoption of Floor Coverage" party_id "Legislator Party, 1=GOP" 1.treatment#2.party_id "Adoption x Party" majority "Majority Party Legislator" veto "Total No. of Bills/Resolutions Vetoed in State-Year" mds1 "Leg. Prof. 1st Dimensional Scaling" mds2 "Leg. Prof. 2nd Dimensional Scaling" state_ideo "State Ideology" ranney "Political Competition" lngsp "Gross State Product (Logged)"  tl "State Term Limits (1=Yes)" lnexp "Logged Legislative Expenditures" citizen_ideo "Citizen Ideology" lnpop "State Population (Logged)" total_intro "Logged No. of Bills Introduced" _cons "Constant")


*Marginal effects for party, for which there is an effect for Dems, not shown in paper but discussed
*Dem Members
reghdfe np_score i.treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)
eststo pp1: margins, at(treatment=(0) majority=(0))  post vsquish

reghdfe np_score i.treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)
eststo pp2: margins, at(treatment=(1) majority=(0))  post vsquish

reghdfe np_score i.treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)
eststo pp3: margins, at(treatment=(0) majority=(1))  post vsquish

reghdfe np_score i.treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)
eststo pp4: margins, at(treatment=(1) majority=(1))  post vsquish

grstyle init
grstyle set plain, horizontal grid dotted
*grstyle set ci burd, select(11 13) opacity(60)
coefplot  ///
(pp1, label(Not Treated, Minority)) (pp2, label(Treated, Minority)) (pp3, label(Not Treated, Majority )) (pp4, label(Treated, Majority)), ///
yline(0) vertical xlabel(none) ylabel(-.7(.05)-.9, valuelabel) ///
ytitle("Predicted Value")  ///
 legend(on) ///
scheme(s1mono) graphregion(fcolor(white) ifcolor(white)) title("Democrats")

*GOP Members
reghdfe np_score i.treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)
eststo pp1: margins, at(treatment=(0) majority=(0))  post vsquish

reghdfe np_score i.treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)
eststo pp2: margins, at(treatment=(1) majority=(0))  post vsquish

reghdfe np_score i.treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)
eststo pp3: margins, at(treatment=(0) majority=(1))  post vsquish

reghdfe np_score i.treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)
eststo pp4: margins, at(treatment=(1) majority=(1))  post vsquish

grstyle init
grstyle set plain, horizontal grid dotted
*grstyle set ci burd, select(11 13) opacity(60)
coefplot  ///
(pp1, label(Not Treated, Minority)) (pp2, label(Treated, Minority)) (pp3, label(Not Treated, Majority )) (pp4, label(Treated, Majority)), ///
yline(0) vertical xlabel(none) ylabel(.7(.05).9, valuelabel) ///
ytitle("Predicted Value")  ///
 legend(on) ///
scheme(s1mono) graphregion(fcolor(white) ifcolor(white)) title("Democrats")



*Figure 6: Estimated Precision of Legislator-Level Null Effects)
****NULL EFFECTS Analysis
*Graph in R file null_effects_analysis_v1

sum np_score if party_id==0
reghdfe np_score i.treatment majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, level(90) absorb(distid1 year) vce(cluster distid1 year)

sum np_score if party_id==1
reghdfe np_score i.treatment majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, level(90) absorb(distid1 year) vce(cluster distid1 year)

sum sles
reghdfe sles treatment party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, level(90) absorb(distid1 year) vce(cluster distid1 year)

sum sles
reghdfe sles i.treatment##i.party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, level(90) absorb(distid1 year) vce(cluster distid1 year)

sum party_loyalty
reghdfe party_loyalty treatment party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, level(90) absorb(distid1 year) vce(cluster distid1 year)

sum party_loyalty
reghdfe party_loyalty i.treatment##i.party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, level(90) absorb(distid1 year) vce(cluster distid1 year)


*Table F3: The Effect of Broadcast/Streamed Floor Coverage on Legislator Outcomes Accounting for Possible Post-Treatment Variables

use "leg_level_forstata_v6_102524.dta", replace

drop if party_id==3
replace veto=veto/100
replace citizen_ideo=citizen_ideo/100
replace state_ideo=state_ideo/100
replace total_intro=ln(total_intro)


*The Effect of Broadcast/Streamed Floor Coverage on Individual Legislator Outcomes--without possible post-treatment variables
*Row 2: Without post-treatment vars
reghdfe np_score i.treatment majority tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop if party_id==0, absorb(distid1 year) vce(cluster distid1 year)

reghdfe np_score i.treatment majority tl mds1 mds2 state_ideo lngsp ranney citizen_ideo lnpop if party_id==1, absorb(distid1 year) vce(cluster distid1 year)

reghdfe np_score i.treatment##i.majority tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop if party_id==0, absorb(distid1 year) vce(cluster distid1 year)

reghdfe np_score treatment##i.majority tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop if party_id==1, absorb(distid1 year) vce(cluster distid1 year)

reghdfe sles treatment party_id majority tl mds1 mds2 state_ideo lngsp ranney citizen_ideo lnpop, absorb(distid1 year) vce(cluster distid1 year)

reghdfe sles i.treatment##i.party_id majority tl mds1 mds2 state_ideo lngsp ranney citizen_ideo lnpop, absorb(distid1 year) vce(cluster distid1 year)

reghdfe sles i.treatment##i.majority party_id  tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop, absorb(distid1 year) vce(cluster distid1 year)

reghdfe party_loyalty treatment party_id majority tl mds1 mds2 state_ideo lngsp ranney citizen_ideo lnpop, absorb(distid1 year) vce(cluster distid1 year)

reghdfe party_loyalty i.treatment##i.party_id majority tl mds1 mds2 state_ideo lngsp citizen_ideo lnpop, absorb(distid1 year) vce(cluster distid1 year)

reghdfe party_loyalty i.treatment##i.majority party_id tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop, absorb(distid1 year) vce(cluster distid1 year)


*Row 3: Lagged variables
sort distid1 year
by distid1: gen lveto =l.veto
by distid1: gen lmds1 =l.mds1
by distid1: gen lmds2 =l.mds2
by distid1: gen lstate_ideo =l.state_ideo
by distid1: gen lranney =l.ranney
by distid1: gen llngsp =l.lngsp
by distid1: gen ltl =l.tl
by distid1: gen llnexp =l.lnexp
by distid1: gen lcitizen_ideo =l.citizen_ideo
by distid1: gen llnpop =l.lnpop
by distid1: gen ltotal_intro =l.total_intro
by distid1: gen lmajority=l.majority
by distid1: gen lparty_id=l.party_id

reghdfe np_score i.treatment lmajority ltl lmds1 lmds2 lstate_ideo lranney llngsp lcitizen_ideo llnpop lveto llnexp ltotal_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)

reghdfe np_score i.treatment lmajority ltl lmds1 lmds2 lstate_ideo llngsp lranney lcitizen_ideo llnpop lveto llnexp ltotal_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)

reghdfe np_score i.treatment##i.lmajority ltl lveto lmds1 lmds2 lstate_ideo lranney llngsp llnexp lcitizen_ideo llnpop ltotal_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)

reghdfe np_score treatment##i.lmajority ltl lveto lmds1 lmds2 lstate_ideo lranney llngsp llnexp lcitizen_ideo llnpop ltotal_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)

reghdfe sles treatment lparty_id lmajority ltl lmds1 lmds2 lstate_ideo llngsp lranney lcitizen_ideo llnpop lveto llnexp ltotal_intro, absorb(distid1 year) vce(cluster distid1 year)

reghdfe sles i.treatment##i.lparty_id lmajority ltl lmds1 lmds2 lstate_ideo llngsp lranney lcitizen_ideo llnpop lveto llnexp ltotal_intro, absorb(distid1 year) vce(cluster distid1 year)

reghdfe sles i.treatment##i.lmajority lparty_id  ltl lveto lmds1 lmds2 lstate_ideo lranney llngsp llnexp lcitizen_ideo llnpop ltotal_intro, absorb(distid1 year) vce(cluster distid1 year)

reghdfe party_loyalty treatment lparty_id lmajority ltl lmds1 lmds2 lstate_ideo llngsp lranney lcitizen_ideo llnpop lveto llnexp ltotal_intro, absorb(distid1 year) vce(cluster distid1 year)

reghdfe party_loyalty i.treatment##i.lparty_id lmajority ltl lmds1 lmds2 lstate_ideo llngsp lcitizen_ideo llnpop lveto llnexp ltotal_intro, absorb(distid1 year) vce(cluster distid1 year)

reghdfe party_loyalty i.treatment##i.lmajority lparty_id ltl lveto lmds1 lmds2 lstate_ideo lranney llngsp llnexp lcitizen_ideo llnpop ltotal_intro, absorb(distid1 year) vce(cluster distid1 year)

*ROW 4
*estimate full model 2. then use pretreatment only as controls in second stage, subtract effect of post-treatment, reestimate
reghdfe np_score i.treatment majority tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop veto lnexp total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)
gen ytilde = np_score - _b[veto] - _b[total_intro] - _b[lnexp] if party_id==0
reghdfe ytilde i.treatment majority tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop if party_id==0, absorb(distid1 year) vce(cluster distid1 year)
drop ytilde

reghdfe np_score i.treatment majority tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop veto lnexp total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)
gen ytilde = np_score - _b[veto] - _b[total_intro] - _b[lnexp] if party_id==1
reghdfe ytilde i.treatment majority tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop if party_id==1, absorb(distid1 year) vce(cluster distid1 year)
drop ytilde

reghdfe np_score i.treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)
gen ytilde = np_score - _b[veto] - _b[total_intro] - _b[lnexp] if party_id==0
reghdfe ytilde i.treatment##i.majority tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop if party_id==0, absorb(distid1 year) vce(cluster distid1 year)
drop ytilde

reghdfe np_score i.treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)
gen ytilde = np_score - _b[veto] - _b[total_intro] - _b[lnexp] if party_id==1
reghdfe ytilde i.treatment##i.majority tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop if party_id==1, absorb(distid1 year) vce(cluster distid1 year)
drop ytilde


reghdfe sles treatment party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)
gen ytilde = sles - _b[veto] - _b[total_intro] - _b[lnexp]
reghdfe ytilde i.treatment party_id tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop, absorb(distid1 year) vce(cluster distid1 year)
drop ytilde

reghdfe sles i.treatment##i.party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)
gen ytilde = sles - _b[veto] - _b[total_intro] - _b[lnexp]
reghdfe ytilde i.treatment##i.party_id majority tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop, absorb(distid1 year) vce(cluster distid1 year)
drop ytilde

reghdfe sles i.treatment##i.majority party_id tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)
gen ytilde = sles - _b[veto] - _b[total_intro] - _b[lnexp]
reghdfe ytilde i.treatment##i.majority party_id tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop, absorb(distid1 year) vce(cluster distid1 year)
drop ytilde

reghdfe party_loyalty treatment party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)
gen ytilde = party_loyalty - _b[veto] - _b[total_intro] - _b[lnexp]
reghdfe ytilde i.treatment i.majority party_id tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop, absorb(distid1 year) vce(cluster distid1 year)
drop ytilde

reghdfe party_loyalty i.treatment##i.party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)
gen ytilde = party_loyalty - _b[veto] - _b[total_intro] - _b[lnexp]
reghdfe party_loyalty i.treatment##i.party_id majority tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop, absorb(distid1 year) vce(cluster distid1 year)
drop ytilde

reghdfe party_loyalty i.treatment##i.majority party_id tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)
gen ytilde = party_loyalty - _b[veto] - _b[total_intro] - _b[lnexp]
reghdfe party_loyalty i.treatment##i.majority party_id tl mds1 mds2 state_ideo ranney lngsp citizen_ideo lnpop, absorb(distid1 year) vce(cluster distid1 year)
drop ytilde

*Table F4 Examining Legislator-Level Treatment Effects Using ``Clean" Treatment States}

use "leg_level_forstata_v6_102524.dta", replace

drop if party_id==3
replace veto=veto/100
replace citizen_ideo=citizen_ideo/100
replace state_ideo=state_ideo/100
replace total_intro=ln(total_intro)


encode state_cham, gen(state_cham2)
drop state_cham
rename state_cham2 state_cham
order state_cham

keep if state_cham==71 | state_cham==72 | state_cham==43 | state_cham==44 | state_cham==57 | state_cham==58 | state_cham==49 |state_cham==50 | state_cham==27 | state_cham==28 | state_cham==5 | state_cham==6 | state_cham==47 | state_cham==48 | state_cham==73 | state_cham==74 | state_cham==39 | state_cham==62 | state_cham==7 | state_cham==8 |state_cham==51 | state_cham==52 | state_cham==96 | state_cham==48 |state_cham==54 | state_cham==79 | state_cham==80 |state_cham==23 | state_cham==24 | state_cham==69 | state_cham==70 | state_cham==75 | state_cham==76 | state_cham==35 | state_cham==91 | state_cham==92 | state_cham==48 | state_cham==54 | state_cham==79 | state_cham==87 |state_cham==88


eststo ind1a: reghdfe np_score i.treatment majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)

eststo ind1b: reghdfe np_score i.treatment majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)

eststo ind2a: reghdfe sles treatment party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)

eststo ind2b: reghdfe sles i.treatment##i.party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)

eststo ind3a: reghdfe party_loyalty treatment party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)

eststo ind3b: reghdfe party_loyalty i.treatment##i.party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)
margins, at(treatment=(0 1) party=(0 1))  post vsquish

estout ind1a ind1b ind2a ind2b ind3a ind3b, style(tex) cells(b(star fmt(2)) se(par)) starlevels($^\#$ .1 * 0.05) stats(aic N r2) ///
varlabels(1.treatment "Adoption of Floor Coverage" 2.party_id "Legislator Party, 1=GOP" 1.treatment#2.party_id "Adoption x Party" majority "Majority Party Legislator" veto "Total No. of Bills/Resolutions Vetoed in State-Year" mds1 "Leg. Prof. 1st Dimensional Scaling" mds2 "Leg. Prof. 2nd Dimensional Scaling" state_ideo "State Ideology" ranney "Political Competition" lngsp "Gross State Product (Logged)"  tl "State Term Limits (1=Yes)" lnexp "Logged Legislative Expenditures" citizen_ideo "Citizen Ideology" lnpop "State Population (Logged)" total_intro "Logged No. of Bills Introduced" _cons "Constant")




*Table F5: The Effect of Broadcast/Streamed Floor Coverage on Individual Legislator Outcomes Conditional on Legislative Professional and Term Limits
use "leg_level_forstata_v6_102524.dta", replace

drop if party_id==3
replace veto=veto/100
replace citizen_ideo=citizen_ideo/100
replace state_ideo=state_ideo/100
replace total_intro=ln(total_intro)

eststo ind1a: reghdfe np_score i.treatment##c.mds1 majority tl veto mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)
margins, at(treatment=(0 1) mds1=(-2 8.5))  post vsquish


eststo ind1b: reghdfe np_score i.treatment##i.tl c.mds1 majority veto mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)
margins, at(treatment=(0 1) tl=(0 1))  post vsquish

eststo ind2a: reghdfe np_score i.treatment##c.mds1 majority tl veto mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)
margins, at(treatment=(0 1) mds1=(-2 8.5))  post vsquish

eststo ind2b: reghdfe np_score i.treatment##i.tl c.mds1 majority veto mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)
margins, at(treatment=(0 1) tl=(0 1))  post vsquish

eststo ind3a: reghdfe sles i.treatment##c.mds1 i.party_id majority tl veto mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)
margins, at(treatment=(0 1) mds1=(-2 8.5))  post vsquish


eststo ind3b: reghdfe sles i.treatment##i.tl c.mds1 i.party_id majority veto mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)
margins, at(treatment=(0 1) tl=(0 1))  post vsquish

eststo ind4a: reghdfe party_loyalty i.treatment##c.mds1 party_id majority tl veto mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)
margins, at(treatment=(0 1) mds1=(-2 8.5))  post vsquish


eststo ind4b: reghdfe party_loyalty i.treatment##i.tl i.party_id majority veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)
margins, at(treatment=(0 1) tl=(0 1))  post vsquish

estout ind1a ind1b ind2a ind2b ind3a ind3b ind4a ind4b, style(tex) cells(b(star fmt(2)) se(par)) starlevels($^\#$ .1 * 0.05) stats(aic N r2) ///
varlabels(1.treatment "Adoption of Floor Coverage" 2.party_id "Legislator Party, 1=GOP" 1.treatment#2.party_id "Adoption x Party" majority "Majority Party Legislator" veto "Total No. of Bills/Resolutions Vetoed in State-Year" mds1 "Leg. Prof. 1st Dimensional Scaling" mds2 "Leg. Prof. 2nd Dimensional Scaling" state_ideo "State Ideology" ranney "Political Competition" lngsp "Gross State Product (Logged)"  tl "State Term Limits (1=Yes)" lnexp "Logged Legislative Expenditures" citizen_ideo "Citizen Ideology" lnpop "State Population (Logged)" total_intro "Logged No. of Bills Introduced" _cons "Constant")



use "leg_level_forstata_v6_102524.dta", replace


*Table G1: Predicting Change in Treatment Status Using Outcomes 
*Parallel Trends check 1
eststo test1aind: xtreg d.treatment np_score i.year if party_id==0, fe vce(cluster distid1)
eststo test1bind: xtreg d.treatment np_score i.year if party_id==1, fe vce(cluster distid1)
eststo test1cind: xtreg d.treatment np_score majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro i.year if party_id==0, fe vce(cluster distid1)
eststo test1dind: xtreg d.treatment np_score majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro i.year if party_id==1, fe vce(cluster distid1)

eststo test2aind: xtreg d.treatment sles i.year, fe vce(cluster distid1)
eststo test2bind: xtreg d.treatment sles majority party_id tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro i.year, fe vce(cluster distid1)

eststo test3aind: xtreg d.treatment c.sles##i.party_id i.year, fe vce(cluster distid1)
eststo test3bind: xtreg d.treatment c.sles##i.party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro i.year, fe vce(cluster distid1)

eststo test4aind: xtreg d.treatment party_loyalty i.year, fe vce(cluster distid1)
eststo test4bind: xtreg d.treatment party_loyalty majority party_id tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro i.year, fe vce(cluster distid1)

eststo test5aind: xtreg d.treatment c.party_loyalty##i.party_id i.year, fe vce(cluster distid1)
eststo test5bind: xtreg d.treatment c.party_loyalty##i.party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro i.year, fe vce(cluster distid1)

estout test1aind test1bind test1cind test1dind test2aind test2bind  test3aind test3bind test4aind test4bind test5aind test5bind, style(tex) cells(b(star fmt(2)) se(par)) starlevels($^\#$ .1 * 0.05) stats(aic N r2) ///
varlabels(1.treatment "Adoption of Floor Coverage" party_id "Legislator Party, 1=GOP" 1.treatment#2.party_id "Adoption x Party" majority "Majority Party Legislator" veto "Total No. of Bills/Resolutions Vetoed in State-Year" mds1 "Leg. Prof. 1st Dimensional Scaling" mds2 "Leg. Prof. 2nd Dimensional Scaling" state_ideo "State Ideology" ranney "Political Competition" lngsp "Gross State Product (Logged)"  tl "State Term Limits (1=Yes)" lnexp "Logged Legislative Expenditures" citizen_ideo "Citizen Ideology" lnpop "State Population (Logged)" total_intro "Logged No. of Bills Introduced" _cons "Constant")



*Table G2: Predicting Lagged Treatment Status Using Outcomes
*Parallel Trends check 2

sort distid1 year
eststo test1aind: reghdfe l.np_score treatment if party_id==0, absorb(distid1 year) vce(cluster distid1 year)
eststo test1bind: reghdfe l.np_score treatment if party_id==1, absorb(distid1 year) vce(cluster distid1 year)

eststo test2aind: reghdfe l.np_score treatment majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)
eststo test2bind: reghdfe l.np_score treatment majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)

eststo test3aind: reghdfe l.sles treatment, absorb(distid1 year) vce(cluster distid1 year)
eststo test3bind: reghdfe l.sles treatment majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro party_id, absorb(distid1 year) vce(cluster distid1 year)

eststo test4aind: reghdfe l.party_loyalty treatment, absorb(distid1 year) vce(cluster distid1 year)
eststo test4bind: reghdfe l.party_loyalty treatment majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro party_id, absorb(distid1 year) vce(cluster distid1 year)

estout test1aind test1bind  test2aind test2bind  test3aind test3bind test4aind test4bind, style(tex) cells(b(star fmt(2)) se(par)) starlevels($^\#$ .1 * 0.05) stats(aic N r2) ///
varlabels(treatment "Adoption of Floor Coverage" party_id "Legislator Party, 1=GOP" 1.treatment#2.party_id "Adoption x Party" majority "Majority Party Legislator" veto "Total No. of Bills/Resolutions Vetoed in State-Year" mds1 "Leg. Prof. 1st Dimensional Scaling" mds2 "Leg. Prof. 2nd Dimensional Scaling" state_ideo "State Ideology" ranney "Political Competition" lngsp "Gross State Product (Logged)"  tl "State Term Limits (1=Yes)" lnexp "Logged Legislative Expenditures" citizen_ideo "Citizen Ideology" lnpop "State Population (Logged)" total_intro "Logged No. of Bills Introduced" _cons "Constant")



*Figure 7 and Table H1: Estimated Legislator-Level Treatment Effects Over Time

use "leg_level_forstata_v6_102524.dta", replace

drop if party_id==3
replace veto=veto/100
replace citizen_ideo=citizen_ideo/100
replace state_ideo=state_ideo/100
replace total_intro=ln(total_intro)

replace treatment=. if treatment==1 & year==1993

*Democrat ideology
xthdidregress ra (np_score ) (treatment) if party_id==0, group(distid1)
estat aggregation, time graph

*time since adoption
*estat aggregation, dynamic graph 

*GOP Ideology
xthdidregress ra (np_score) (treatment) if party_id==1, group(distid1)
estat aggregation, time graph

*SLES
xthdidregress ra (sles) (treatment), group(distid1)
estat aggregation, time graph

*Party Loyalty
replace treatment=. if treatment==1 & year<1996
xthdidregress ra (party_loyalty) (treatment) if party_id==1, group(distid1)
estat aggregation, time graph

*not shown in paper, but discussed

/*
use ".\Data\Saved Data\leg_level_forstata_v5_051524.dta", replace

drop if party_id==3
replace veto=veto/100
replace citizen_ideo=citizen_ideo/100
replace state_ideo=state_ideo/100
replace total_intro=ln(total_intro)


*Democrat ideology
replace treatment=. if treatment==1 & year<1994

xthdidregress twfe (np_score ) (treatment) if party_id==0, group(distid1)
estat aggregation, time graph

*GOP Ideology
xthdidregress twfe (np_score ) (treatment) if party_id==1, group(distid1)
estat aggregation, time graph

*SLES
xthdidregress twfe (sles) (treatment), group(distid1)
estat aggregation, time graph

*Party Loyalty
replace treatment=. if treatment==1 & year<1996
xthdidregress twfe (party_loyalty) (treatment) if party_id==1, group(distid1)
estat aggregation, time graph
*/

*these data are loaded from an excel file generated by the above code

use "bacondecomp_time_aggregate_leg_level.dta", clear

sum year if np_score_party0_heteffect==1
twoway rarea lci uci year if np_score_party0_heteffect==1, color(gs14) ///
ytitle("Estimated Coefficient of Adoption")  ///
legend(on) legend(region(lstyle(none))) ///
xlabel(1995(5)2020, valuelabel) ylabel(-1(.25)1, valuelabel) ///
xtitle("Year") ///
legend(order(1 "95% CI")) ///
yline(0) ///
scheme(s1mono) graphregion(fcolor(white) ifcolor(white)) title("Democratic Ideology")
graph save np_score0_heteffect.gph, replace

sum year if np_score_party1_heteffect==1
twoway rarea lci uci year if np_score_party1_heteffect==1, color(gs14) ///
ytitle("Estimated Coefficient of Adoption")  ///
legend(on) legend(region(lstyle(none))) ///
xlabel(1995(5)2020, valuelabel) ylabel(-1(.25)1, valuelabel) ///
xtitle("Year") ///
legend(order(1 "95% CI")) ///
yline(0) ///
scheme(s1mono) graphregion(fcolor(white) ifcolor(white)) title("Republican Ideology")
graph save np_score1_heteffect.gph, replace

sum year if sles==1
twoway rarea lci uci year if sles_heteffect==1, color(gs14) ///
ytitle("Estimated Coefficient of Adoption")  ///
legend(on) legend(region(lstyle(none))) ///
xlabel(1996(4)2018, valuelabel) ylabel(-1(.25)1, valuelabel) ///
xtitle("Year") ///
legend(order(1 "95% CI")) ///
yline(0) ///
scheme(s1mono) graphregion(fcolor(white) ifcolor(white)) title("Legislative Effectiveness")
graph save leg_effectiveness_heteffect.gph, replace

sum year if party_loyalty_heteffect==1
twoway rarea lci uci year if party_loyalty_heteffect==1, color(gs14) ///
ytitle("Estimated Coefficient of Adoption")  ///
legend(on) legend(region(lstyle(none))) ///
xlabel(1996(4)2016, valuelabel) ylabel(-1(.25)1, valuelabel) ///
xtitle("Year") ///
legend(order(1 "95% CI")) ///
yline(0) ///
scheme(s1mono) graphregion(fcolor(white) ifcolor(white)) title("Party Loyalty")
graph save party_loyalty_heteffect.gph, replace

graph combine np_score0_heteffect.gph np_score1_heteffect.gph leg_effectiveness_heteffect.gph party_loyalty_heteffect.gph, cols(2)  scale(.6) scheme(s1mono) graphregion(fcolor(white) ifcolor(white))

graph export "hetero_effects_leg_level_graph.pdf", replace


*Figure H1: Estimated Legislator-Level Treatment Effects Over Time Using Clean Treatment States
use "leg_level_forstata_v6_102524.dta", replace

drop if party_id==3
replace veto=veto/100
replace citizen_ideo=citizen_ideo/100
replace state_ideo=state_ideo/100
replace total_intro=ln(total_intro)


encode state_cham, gen(state_cham2)
drop state_cham
rename state_cham2 state_cham
order state_cham

keep if state_cham==71 | state_cham==72 | state_cham==43 | state_cham==44 | state_cham==57 | state_cham==58 | state_cham==49 |state_cham==50 | state_cham==27 | state_cham==28 | state_cham==5 | state_cham==6 | state_cham==47 | state_cham==48 | state_cham==73 | state_cham==74 | state_cham==39 | state_cham==62 | state_cham==7 | state_cham==8 |state_cham==51 | state_cham==52 | state_cham==96 | state_cham==48 |state_cham==54 | state_cham==79 | state_cham==80 |state_cham==23 | state_cham==24 | state_cham==69 | state_cham==70 | state_cham==75 | state_cham==76 | state_cham==35 | state_cham==91 | state_cham==92 | state_cham==48 | state_cham==54 | state_cham==79 | state_cham==87 |state_cham==88


replace treatment=. if treatment==1 & year==1993

*Democrat ideology
xthdidregress ra (np_score ) (treatment) if party_id==0, group(distid1)
estat aggregation, time graph

*time since adoption
*estat aggregation, dynamic graph 

*GOP Ideology
xthdidregress ra (np_score) (treatment) if party_id==1, group(distid1)
estat aggregation, time graph

*SLES
xthdidregress ra (sles) (treatment), group(distid1)
estat aggregation, time graph

*Party Loyalty
replace treatment=. if treatment==1 & year<1996
xthdidregress ra (party_loyalty) (treatment) if party_id==1, group(distid1)
estat aggregation, time graph


*this loads the results generated above and creates the graphs
use "bacondecomp_time_aggregate_leg_level_clean.dta", clear

sum year if np_score_party0_heteffect==1
twoway rarea lci uci year if np_score_party0_heteffect==1, color(gs14) ///
ytitle("Estimated Coefficient of Adoption")  ///
legend(on) legend(region(lstyle(none))) ///
xlabel(1998(4)2018, valuelabel) ylabel(-1(.25)1, valuelabel) ///
xtitle("Year") ///
legend(order(1 "95% CI")) ///
yline(0) ///
scheme(s1mono) graphregion(fcolor(white) ifcolor(white)) title("Democratic Ideology")
graph save np_score0_heteffect.gph, replace

sum year if np_score_party1_heteffect==1
twoway rarea lci uci year if np_score_party1_heteffect==1, color(gs14) ///
ytitle("Estimated Coefficient of Adoption")  ///
legend(on) legend(region(lstyle(none))) ///
xlabel(1998(4)2016, valuelabel) ylabel(-1(.25)1, valuelabel) ///
xtitle("Year") ///
legend(order(1 "95% CI")) ///
yline(0) ///
scheme(s1mono) graphregion(fcolor(white) ifcolor(white)) title("Republican Ideology")
graph save np_score1_heteffect.gph, replace

sum year if sles==1
twoway rarea lci uci year if sles_heteffect==1, color(gs14) ///
ytitle("Estimated Coefficient of Adoption")  ///
legend(on) legend(region(lstyle(none))) ///
xlabel(1998(4)2018, valuelabel) ylabel(-1(.25)1, valuelabel) ///
xtitle("Year") ///
legend(order(1 "95% CI")) ///
yline(0) ///
scheme(s1mono) graphregion(fcolor(white) ifcolor(white)) title("Legislative Effectiveness")
graph save leg_effectiveness_heteffect.gph, replace

sum year if party_loyalty_heteffect==1
twoway rarea lci uci year if party_loyalty_heteffect==1, color(gs14) ///
ytitle("Estimated Coefficient of Adoption")  ///
legend(on) legend(region(lstyle(none))) ///
xlabel(1998(4)2014, valuelabel) ylabel(-1(.25)1, valuelabel) ///
xtitle("Year") ///
legend(order(1 "95% CI")) ///
yline(0) ///
scheme(s1mono) graphregion(fcolor(white) ifcolor(white)) title("Party Loyalty")
graph save party_loyalty_heteffect.gph, replace

graph combine np_score0_heteffect.gph np_score1_heteffect.gph leg_effectiveness_heteffect.gph party_loyalty_heteffect.gph, cols(2)  scale(.6) scheme(s1mono) graphregion(fcolor(white) ifcolor(white))



*Panelmatch in R files 02panelmatch_balancetests_leg_level_v4_102524, 03panelmatch_analysis_leg_level_v3_102524, and 04panelmatch_analysis__cleanadoption_v1_111024showing Figure 9 and Figures I.1-I.6

*With slightly different year coding based on changes from recontact

*"New Mexico SENATE and house maybe"	2017?	2017--we spoke to different people and they were extremely unsure so we have low confidence this is correct
*Arizona 2006 2006
*Montana 2003 2003
*Louisiana Senate 2008


use "leg_level_forstata_v6_102524.dta", replace

drop if party_id==3
replace veto=veto/100
replace citizen_ideo=citizen_ideo/100
replace state_ideo=state_ideo/100
replace total_intro=ln(total_intro)

replace treatment=0 if year<2006 & state=="AZ"
replace treatment=1 if year>2005 & state=="AZ"

replace treatment=0 if year<2003 & state=="MT"
replace treatment=1 if year>2002 & state=="MT"

replace treatment=0 if year<2017 & state=="NM"
replace treatment=1 if year>2016 & state=="NM"

replace treatment=0 if year<2008 & state_cham=="LA_Senate"



*this is equivalent of using xtreg as far as coefficients go, but doing reghdfe to use multiway standard errors for state_cham and year

*Table F1: The Effect of Broadcast/Streamed Floor Coverage on Individual Legislator Outcomes
eststo ind1a: reghdfe np_score i.treatment majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)

eststo ind1b: reghdfe np_score i.treatment majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)

eststo ind2a: reghdfe sles treatment party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)

eststo ind2b: reghdfe sles i.treatment##i.party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)

eststo ind3a: reghdfe party_loyalty treatment party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)

eststo ind3b: reghdfe party_loyalty i.treatment##i.party_id majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)

estout ind1a ind1b ind2a ind2b ind3a ind3b, style(tex) cells(b(star fmt(2)) se(par)) starlevels($^\#$ .1 * 0.05) stats(aic N r2) ///
varlabels(1.treatment "Adoption of Floor Coverage" 2.party_id "Legislator Party, 1=GOP" 1.treatment#2.party_id "Adoption x Party" majority "Majority Party Legislator" veto "Total No. of Bills/Resolutions Vetoed in State-Year" mds1 "Leg. Prof. 1st Dimensional Scaling" mds2 "Leg. Prof. 2nd Dimensional Scaling" state_ideo "State Ideology" ranney "Political Competition" lngsp "Gross State Product (Logged)"  tl "State Term Limits (1=Yes)" lnexp "Logged Legislative Expenditures" citizen_ideo "Citizen Ideology" lnpop "State Population (Logged)" total_intro "Logged No. of Bills Introduced" _cons "Constant")

*The Effect of Broadcast/Streamed Floor Coverage on Individual Legislator Outcomes Conditional on Majority Party Status
eststo ind4a: reghdfe np_score i.treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==0, absorb(distid1 year) vce(cluster distid1 year)

eststo ind4b: reghdfe np_score treatment##i.majority tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro if party_id==1, absorb(distid1 year) vce(cluster distid1 year)

eststo ind5: reghdfe sles i.treatment##i.majority party_id  tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)

eststo ind6: reghdfe party_loyalty i.treatment##i.majority party_id tl veto mds1 mds2 state_ideo ranney lngsp lnexp citizen_ideo lnpop total_intro, absorb(distid1 year) vce(cluster distid1 year)


estout ind4a ind4b ind5 ind6, style(tex) cells(b(star fmt(2)) se(par)) starlevels($^\#$ .1 * 0.05) stats(aic N r2) ///
varlabels(1.treatment "Adoption of Floor Coverage" party_id "Legislator Party, 1=GOP" 1.treatment#2.party_id "Adoption x Party" majority "Majority Party Legislator" veto "Total No. of Bills/Resolutions Vetoed in State-Year" mds1 "Leg. Prof. 1st Dimensional Scaling" mds2 "Leg. Prof. 2nd Dimensional Scaling" state_ideo "State Ideology" ranney "Political Competition" lngsp "Gross State Product (Logged)"  tl "State Term Limits (1=Yes)" lnexp "Logged Legislative Expenditures" citizen_ideo "Citizen Ideology" lnpop "State Population (Logged)" total_intro "Logged No. of Bills Introduced" _cons "Constant")

